<?php
/*
Template Name: Services
*/
?>
<?php get_header(); ?>
<?php while (have_posts()) : the_post(); ?>
  <div class="grid_8" id="main">
  	<div class="grid_8 alpha omega post" id="post">
  		<div class="grid_7 alpha" id="title"><h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2></div>
    	<div class="grid_1 omega comment-count" ><?php comments_number('0', '1', '%'); ?></div>
    	<div class="grid_7 alpha postdata">Written on: <?php the_time('m-d-y') ?> &#183; <?php the_tags(__('Tags:', 'elegant-grunge').' ', ', ', ''); ?>
        <?php if ( count(($categories=get_the_category())) > 1 || $categories[0]->cat_ID != 1 ) {
						printf(__('and is filed under %s', 'elegant-grunge'), join(', ', array_map(create_function('$item', 'return $item->cat_name;'), get_the_category(', '))));
					}?></div>
    	<div class="grid_8 alpha omega content"><?php the_content(); ?></div>
    </div>
    <div class="grid_4 alpha previous-link"><?php previous_post_link('&laquo; %link (last)') ?></div>
    <div class="grid_4 omega next-link"><?php next_post_link('(new) %link &raquo;') ?></div>
    <div class="grid_8 alpha omega" id="comments"><?php comments_template(); ?></div>
  </div>
<?php
 endwhile; ?>
<div class="grid_4" id="sidebar">
	<div class="grid_4 alpha omega" id="services">
    	<div class="grid_4 alpha omega topictitle" id="servicestitle">
       		<a href="/services">Services</a>
       	</div>
		<ul>
<?php
$services = get_ServicesPages();
foreach($services as $post) :
    setup_postdata($post);
?>
			<li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?> 
		</ul>
	</div>
    <div class="grid_4 alpha omega" id="showcase">
  		<div class="grid_4 alpha omega topictitle" id="casetitle"><a href="/showcase">Social</a></div>
        <div class="grid_4 alpha omega" id="casecontent">Cases</div>
  	</div>
    <div class="grid_4 alpha omega" id="blog">
  		<div class="grid_4 alpha omega topictitle" id="blogtitle"><a href="/blog">Blog</a></div>
        <div class="grid_4 alpha omega" id="blogcontent">Cases</div>
  	</div> 
</div>
<?php get_footer(); ?>